﻿using System.Windows;
using GalaSoft.MvvmLight.Messaging;
using Drafter.ViewModel;
using FluidKit.Controls;

namespace Drafter
{
    /// <summary>
    /// Description for MainWindowView.
    /// </summary>
    public partial class MainWindowView : Window
    {
        private string currentView;
        /// <summary>
        /// Initializes a new instance of the MainWindowView class.
        /// </summary>
        public MainWindowView()
        {
            InitializeComponent();
            Closing += (s, e) => ViewModelLocator.Cleanup();
            Messenger.Default.Register<string>(this, Navigate);
            currentView = "Edit";
            
        }
        public void Navigate(string targetView)
        {
  
              FlipTransition transition = Resources["FlipTransition"] as FlipTransition;
            //CubeTransition transition = Resources["CubeTransition"] as CubeTransition;
           
          
                transition.Rotation = Direction.RightToLeft;
                TransitionContainer.Transition = transition;
                TransitionContainer.ApplyTransition(currentView, targetView);
                currentView = targetView;

             
        }

        
    }
}